package com.InterestingExercises.ATM_Project;

public class Account {
    private String cardId;//卡号
    private String userName;//用户名
    private char gender;//性别
    private String password;//密码
    private double balance;//余额
    private double quota;//每次取现额度

    public Account() {

    }

    public Account(String cardId, String userName, char gender, String password, double balance, double quota) {
        this.cardId = cardId;
        this.userName = userName;
        this.gender = gender;
        this.password = password;
        this.balance = balance;
        this.quota = quota;
    }

    @Override
    public String toString() {
        return "Account{" +
                "cardId='" + cardId + '\'' +
                ", userName='" + userName + '\'' +
                ", gender=" + gender +
                ", password='" + password + '\'' +
                ", balance=" + balance +
                ", quota=" + quota +
                '}';
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getUserName() {
        return userName + (gender == '男' ? "先生" : "女士");
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public double getQuota() {
        return quota;
    }

    public void setQuota(double quota) {
        this.quota = quota;
    }
}
